# import requests
# from curl_cffi import requests
#
# url = 'https://www.360kan.com/rank/general'
# # print(response.status_code)
# headers = {
#     "user-agent":'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36'}
# response = requests.get(url,headers=headers)
# content = response.content.decode('utf-8')
# print(content)


import  asyncio
import aiohttp


async def fetch(session, url):
    async with session.get(url) as response:
        response = await response.json()
        print(response,type(response))


async def main():
    async with aiohttp.ClientSession() as session:
        urls = [f'https://api.web.360kan.com/v1/rank?cat={t}' for t in range(1, 7)]
        tasks = [fetch(session, url) for url in urls]
        await asyncio.gather(*tasks)


asyncio.run(main())